package com.zhaolang.qogir.domain;

import com.zhaolang.qogir.bean.ProductBean;
import com.zhaolang.qogir.bean.ProductClassBean;

import java.util.List;

/**
 * @author wes
 * 增加商品管理
 */
public abstract class WaresManage {
    //更新商品的图片
    public abstract void updateWaresImageAsync(List<String> imgs, String productId, BaseCall<UpdateShopResp> call);
    //update shop product
    public abstract void updateWaresRequirementsAsync(ProductBeanReq shopBeanReq, BaseCall<UpdateShopResp> call);
    //update shop product class
    public abstract void updateShopProductClassAsync(ProductClassBeanReq productClassBeanReq, BaseCall<BaseResp> call);
    //get shop class async
    public abstract void getShopClassAsync(BaseCall<ListProductClassBeanReq> call);
    //get all product by shop id
    public abstract void getAllProductAsync(BaseCall<ListProductBeanReq> call);
    //get specific product by product id
    public abstract void getProductAsync(String productId, BaseCall<ProductReq> call);

    public static class UpdateShopResp extends BaseResp {

        private String thumbnailURL;
        private String shopId;
        private String productId;

        public String getShopId() {
            return shopId;
        }

        public void setShopId(String shopId) {
            this.shopId = shopId;
        }

        public String getThumbnailURL() {
            return thumbnailURL;
        }

        public void setThumbnailURL(String thumbnailURL) {
            this.thumbnailURL = thumbnailURL;
        }

        public void setProductId(String productId){
            this.productId = productId;
        }

        public String getProductId(){
            return productId;
        }
    }

    /**
     * Product details info req
     */
    public static class ProductReq extends BaseResp{
        public ProductBean productBean;

        public void setProductBean(ProductBean productBean){
            this.productBean = productBean;
        }

        public ProductBean getProductBean() {
            return productBean;
        }
    }

    //product bean
    public static class ProductBeanReq extends BaseResp {
        public String name;  //昵称
        public String price;
        public String desc;
        public String classId;
        public String delivery;
        public String stock;
        public String maxStock;
        public String thumbnail;
        public String shopId;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getDelivery() {
            return delivery;
        }

        public void setDelivery(String delivery) {
            this.delivery = delivery;
        }

        public String getClassId() {
            return classId;
        }

        public void setClassId(String address) {
            this.classId = address;
        }

        public String getStock() {
            return stock;
        }

        public void setStock(String stock) {
            this.stock = stock;
        }

        public String getMaxStock() {
            return maxStock;
        }

        public void setMaxStock(String maxStock) {
            this.maxStock = maxStock;
        }

        public String getThumbnail() {
            return thumbnail;
        }

        public void setThumbnail(String thumbnail) {
            this.thumbnail = thumbnail;
        }

        public void setShopId(String shopId){
            this.shopId = shopId;
        }

        public String getShopId(){
            return shopId;
        }

    }

    //product class bean
    public static class ProductClassBeanReq extends BaseResp {
        public String proclassName;

        public void setProclassName(String proclassName){
            this.proclassName = proclassName;
        }

        public String getProclassName(){
            return proclassName;
        }
    }

    public static class ListProductClassBeanReq extends BaseResp {
        public List<ProductClassBean> proclassList;
        public int beanListSize;

        public List<ProductClassBean> getProclassList() {
            return proclassList;
        }

        public void setProclassList(List<ProductClassBean> proclassList) {
            this.proclassList = proclassList;
        }

        public void setBeanListSize(int beanListSize){
            this.beanListSize = beanListSize;
        }

        public int getBeanListSize(){
            return beanListSize;
        }
    }

    public static class ListProductBeanReq extends BaseResp {
        public List<ProductBean> proList;
        public int beanListSize;

        public List<ProductBean> getProList() {
            return proList;
        }

        public void setProList(List<ProductBean> proList) {
            this.proList = proList;
        }

        public void setBeanListSize(int beanListSize){
            this.beanListSize = beanListSize;
        }

        public int getBeanListSize(){
            return beanListSize;
        }
    }
}
